## React

React is a JavaScript library for building user interfaces.

- Declarative
- Component-based
- _"Learn Once, Write Anywhere"_

---

## Declarative

We define the _current state_ of the UI and let React figure out _how_ to render it.

React figures out how to call `view.addView`/`view.addSubview` for us.

> React figures out the optimal way to update the UI.

Similar to SwiftUI & Jetpack Compose

---

## Component-based

- Components are encapsulated
- Everything is a component - no view controllers or fragments
- Written entirely in JavaScript - no storyboards or layout files

---

## _Learn Once, Write Anywhere_

If you learn JavaScript and React, you can write:

- Mobile apps (React Native)
- Websites (React DOM)
- Desktop apps (React Native Windows / React Native macOS)
- VR apps (React 360)
- ...and more!

> The React library is the same for each. We pair it with platform-specific API bindings.

---

## Reference

All slides available online: [reactnative.express/slides](https://www.reactnative.express/slides)
